package com.insurance.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.insurance.common.enums.ApprovalStateEnum;
import lombok.Data;
import org.apache.commons.lang.StringUtils;

import java.io.Serializable;
import java.util.Date;

/**
 * 企业信息
 * @date 2021-02-25 17:20:28
 */
@Data
@TableName("authentication_enterprise")
public class AuthenticationEnterpriseEntity implements Serializable {
	
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId
	private String id;

	/**
	 * 企业名称
	 */
	private String enterpriseName;

	/**
	 * 证件类型
	 */
	private String certificateType;

	/**
	 * 证件号
	 */
	private String certificateNo;

	/**
	 * $column.comments
	 */
	private String cardAlidTime;
	/**
	 * $column.comments
	 */
	private String registerAddress;
	/**
	 * $column.comments
	 */
	private String legalPerson;
	/**
	 * $column.comments
	 */
	private String legalCardType;
	/**
	 * $column.comments
	 */
	private String legalCardId;
	/**
	 * $column.comments
	 */
	private String phoneNumber;
	/**
	 * $column.comments
	 */
	private String email;
	/**
	 * $column.comments
	 */
	private String contactsName;
	/**
	 * $column.comments
	 */
	private String contactsPhone;
	/**
	 * $column.comments
	 */
	private String contactsEmail;
	/**
	 * $column.comments
	 */
	private String licenseFile;
	/**
	 * $column.comments
	 */
	private Date createTime;
	/**
	 * $column.comments
	 */
	private String createPersonId;
	/**
	 * $column.comments
	 */
	private String createPersonName;
	/**
	 * $column.comments
	 */
	private Date updateTime;
	/**
	 * $column.comments
	 */
	private String updatePersonId;
	/**
	 * $column.comments
	 */
	private String updatePersonName;
	/**
	 * $column.comments
	 */
	private Date deleteTime;
	/**
	 * $column.comments
	 */
	private String deletePersonId;
	/**
	 * $column.comments
	 */
	private String deletePersonName;

	/**
	 * 来源
	 */
	private String appId;

	/**
	 * $column.comments
	 */
	private String state;
	/**
	 * $column.comments
	 */
	private String deleteFlag;

	@TableField(exist=false)
	private String idText;

	@TableField(exist=false)
	private String stateText;

	@TableField(exist=false)
	private String timeStamp;

	public String getIdText() {
		return this.id != null ? String.valueOf(this.id) : "";
	}

	public String getStateText() {
		return ApprovalStateEnum.getMessage(this.state);
	}
}
